package Mangos::DB::Characters::Mail;

use strict;

use base qw(Mangos::DB::Characters);

__PACKAGE__->meta->setup
(
    table   => 'mail',

    columns => 
    [
        id             => { type => 'integer', not_null => 1 },
        messageType    => { type => 'integer', default => '0', not_null => 1 },
        stationery     => { type => 'integer', default => 41, not_null => 1 },
        mailTemplateId => { type => 'integer', default => '0', not_null => 1 },
        sender         => { type => 'integer', default => '0', not_null => 1 },
        receiver       => { type => 'integer', default => '0', not_null => 1 },
        subject        => { type => 'scalar', length => 4294967295 },
        itemTextId     => { type => 'integer', default => '0', not_null => 1 },
        has_items      => { type => 'integer', default => '0', not_null => 1 },
        expire_time    => { type => 'bigint', default => '0', not_null => 1 },
        deliver_time   => { type => 'bigint', default => '0', not_null => 1 },
        money          => { type => 'integer', default => '0', not_null => 1 },
        cod            => { type => 'integer', default => '0', not_null => 1 },
        checked        => { type => 'integer', default => '0', not_null => 1 },
    ],

    primary_key_columns => [ 'id' ],
);

1;

package Mangos::DB::Characters::Mail::Manager;

use strict;
use warnings;

use base 'Rose::DB::Object::Manager';

sub object_class { 'Mangos::DB::Characters::Mail' }

__PACKAGE__->make_manager_methods('mail');

1;
